// Learn TypeScript:
//  - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html

import gameData from "../gameData";

const {ccclass, property} = cc._decorator;

@ccclass
export default class testView extends cc.Component {

    btnClick(event,data){
        if(parseInt(data) < 11){
            gameData.setCurrentTimes(6 + parseInt(data));
            this.node.destroy();
        }else if(parseInt(data) == 11){
            gameData.openSetTime = false;
            this.node.destroy();
        }else if(parseInt(data) == 12){
           this.node.destroy();
        }
    }
}
